import React, { Component } from 'react'
import { Form, Input, Button, Checkbox, Select, DatePicker, Table } from 'antd'
import './index.less'

const { Option } = Select
const { RangePicker } = DatePicker

export default class Clue extends Component {
  render() {
    // 提交表单
    const onFinish = () => {}
    const dataSource = [
      {
        index: '1',
        name: '胡彦斌',
        id: 32,
        phone: 13111111111,
        subject: '西湖区',
        courseName: '湖底公园1号',
        createTime: '2012-12-12',
      },
    ]
    const columns = [
      {
        title: '序号',
        dataIndex: 'index',
      },
      {
        title: '合同编号',
        dataIndex: 'id',
      },
      {
        title: '客户姓名',
        dataIndex: 'name',
      },
      {
        title: '手机号',
        dataIndex: 'phone',
      },
      {
        title: '购买学科',
        dataIndex: 'subject',
      },
      {
        title: '购买课程',
        dataIndex: 'courseName',
      },
      {
        title: '创建时间',
        dataIndex: 'createTime',
      },
      {
        title: '操作',
        dataIndex: 'op',
      },
    ]
    return (
      <div className="contract">
        <Form
          name="basic"
          initialValues={{ remember: true }}
          autoComplete="off"
          onFinish={onFinish}
          className="admin-form"
        >
          <Form.Item name="id" className="admin-item" label="线索ID">
            <Input placeholder="请输入合同编号" className="admin-input" />
          </Form.Item>

          <Form.Item name="name" className="admin-item" label="手机号">
            <Input placeholder="请输入客户姓名" className="admin-input" />
          </Form.Item>

          <Form.Item name="photo" className="admin-item" label="线索归属">
            <Input placeholder="请输入手机号" className="admin-input" />
          </Form.Item>

          <Form.Item name="createTime" className="admin-item" label="渠道来源">
            <RangePicker className="admin-input" />
          </Form.Item>

          <Form.Item name="sub" className="admin-item" label="创建时间">
            <Select
              placeholder="请输入购买学科"
              allowClear
              className="admin-select"
            >
              <Option value="0">待跟进</Option>
              <Option value="1">跟进中</Option>
            </Select>
          </Form.Item>

          <Form.Item name="kc" className="admin-item" label="线索状态">
            <Select
              placeholder="请输入购买课程"
              allowClear
              className="admin-select"
            >
              <Option value="0">待跟进</Option>
              <Option value="1">跟进中</Option>
            </Select>
          </Form.Item>

          <Form.Item name="btn" className="admin-item admin-btn">
            <div className="admin-btn-box">
              <Button type="primary" className="admin-search">
                搜索
              </Button>
              <Button type="primary" className="admin-cz">
                重置
              </Button>
            </div>
          </Form.Item>
        </Form>
        <div className="admin_box">
          <div className="admin_btn">
            <Button
              type="primary"
              shape="round"
              className="admin_add"
              onClick={() => {}}
            >
              添加活动
            </Button>
          </div>
        </div>
        <Table
          rowKey="id"
          columns={columns}
          dataSource={dataSource}
          pagination={false}
        />
      </div>
    )
  }
}
